home *** CD-ROM | disk | FTP | other *** search
File List | 1997-05-18 | 3.1 KB | 86 lines |
- #PIC V0.9.2 (c)1997 J.Petroglou LIST FILE
- #file: data:aminetupp/PICSim/examples/simple.asm
- #date: Sat May 10 14:55:39 1997
- #pic : PIC16C54
-
- ADDR CODE SRCLINE SOURCECODE
-
- 0000 000001 ;this is a simple source
- 0000 000002 ;
- 0000 000003 ;this little program toggles the PortA bit 3,
- 0000 000004 ;Port B counts every change on bit RA.3
- 0000 000005 ;
- 0000 000006
- 0000 000007
- 0000 000008
- 0000 000009 list p=PIC16C54, r=dec, s=off
- 0000 000010
- 0000 000011
- 01FF 000012 org 1ffh
- 01FF 0A00 000013 goto start
- 0000 000014 org 0
- 0000 000015
- 0000 000016
- 0000 000017
- 0000 000018 count1 = 0Bh ;this assigns the symbol to the register
- 0000 000019
- 0000 000020 RA = 5 ;PortA is register 5
- 0000 000021 RB = 6 ;PortB is register 6
- 0000 000022
- 0000 000023
- 0000 000024
- 0000 0C07 000025 start movlw 00000111b
- 0001 0005 000026 tris RA ;bit 0 to bit 2 are inputs
- 0002 000027
- 0002 0C00 000028 movlw 0 ;portb is output
- 0003 0006 000029 tris RB
- 0004 000030
- 0004 0066 000031 clrf RB,f ;clear PortB
- 0005 000032
- 0005 0C08 000033 main movlw 00001000b
- 0006 01A5 000034 xorwf RA ;toggle bit 3 from PortA
- 0007 000035
- 0007 02A6 000036 incf RB,f ;increase PortB
- 0008 000037
- 0008 090A 000038 call delay
- 0009 000039
- 0009 0A05 000040 goto main ;do the main loop
- 000A 000041
- 000A 000042
- 000A 000043
- 000A 000044
- 000A 0C14 000045 delay movlw 20
- 000B 002B 000046 movwf count1 ;mov 20 to count1
- 000C 000047
- 000C 02EB 000048 :loop decfsz count1
- 000D 0A0C 000049 goto :loop ;decrement count1 and jump to local symbol until
- 000E 000050 ;loop is > 0
- 000E 0800 000051 retlw 0
-
-
- Used Symbols
- -----------------------------------------
- count1 0000000B
- RA 00000005
- RB 00000006
- start 00000000
- main 00000005
- delay 0000000A
-
-
- PROGRAM MEMORY USAGE TABLE: '-' = not used 'X' = used
-
- 0000 : XXXXXXXXXXXXXXX- ---------------- ---------------- ----------------
- 0040 : ---------------- ---------------- ---------------- ----------------
- 0080 : ---------------- ---------------- ---------------- ----------------
- 00C0 : ---------------- ---------------- ---------------- ----------------
- 0100 : ---------------- ---------------- ---------------- ----------------
- 0140 : ---------------- ---------------- ---------------- ----------------
- 0180 : ---------------- ---------------- ---------------- ----------------
- 01C0 : ---------------- ---------------- ---------------- ---------------X
-
- Program Memory Words Used: 0016
- Program Memory Words Free: 0496
-
- Errors: 0
-